package com.example.result;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author luqi
 * @Date 2025 06 19 09 23
 **/

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Result {
    private Integer code;
    private String msg;
    private Object data;

    public static Result success(Integer code, String msg, Object data){
        return new Result(code, msg, data);
    }
    public static Result success(Integer code, String msg){
        return new Result(code, msg, null);
    }
    public static Result error(Integer code, String msg){
        return new Result(code, msg, null);
    }
    public static Result error(Integer code, String msg, Object data){
        return new Result(code, msg, data);
    }
}
